package com.lu.springbootinit.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lu.springbootinit.model.entity.Chart;
import com.lu.springbootinit.service.ChartService;
import com.lu.springbootinit.mapper.ChartMapper;
import org.springframework.stereotype.Service;

/**
 *
 */
@Service
public class ChartServiceImpl extends ServiceImpl<ChartMapper, Chart>
    implements ChartService{

    public void handleChartError(long chartId, String excMessage) {
        Chart updateChart = new Chart();
        updateChart.setId(chartId);
        updateChart.setState("fail");
        boolean updateResult = updateById(updateChart);
        if(!updateResult){
            log.error("更新图表失败状态失败"+chartId+","+excMessage);
        }
    }
}




